home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / Tk README < prev    next >
Encoding:
Text File  |  1997-08-15  |  17.5 KB  |  381 lines  |  [TEXT/ALFA]

  1. The Tk Toolkit
  2.  
  3. SCCS: @(#) README 1.45 97/08/14 08:48:22
  4.  
  5. 1. Introduction
  6. ---------------
  7.  
  8. This directory and its descendants contain the sources and documentation
  9. for Tk, an X11 toolkit implemented with the Tcl scripting language.  The
  10. information here corresponds to Tk 8.0.  This release is designed to work
  11. with Tcl 8.0 and may not work with any other version of Tcl.
  12.  
  13. Tk 8.0 is a major release with significant new features such as native
  14. look and feel on Macintoshes and PCs, a new font mechanism, application
  15. embedding, and proper support for Safe-Tcl.  See below for details.
  16. There should be no backward incompatibilities in Tk 8.0 that affect
  17. scripts.
  18.  
  19. Note: with this release the Tk version number skips from 4.2 to 8.0.
  20. The jump was made in order to synchronize the Tcl and Tk version
  21. numbers.
  22.  
  23. 2. Documentation
  24. ----------------
  25.  
  26. The best way to get started with Tk is to read one of the introductory
  27. books on Tcl and Tk:
  28.  
  29.     Tcl and the Tk Toolkit, by John Ousterhout,
  30.     Addison-Wesley, 1994, ISBN 0-201-63337-X
  31.  
  32.     Practical Programming in Tcl and Tk, by Brent Welch,
  33.     Prentice-Hall, 1995, ISBN 0-13-182007-9
  34.  
  35.     Exploring Expect, by Don Libes,
  36.     O'Reilly and Associates, 1995, ISBN 1-56592-090-2
  37.  
  38. The "doc" subdirectory in this release contains a complete set of
  39. reference manual entries for Tk.  Files with extension ".1" are for
  40. programs such as wish; files with extension ".3" are for C library
  41. procedures; and files with extension ".n" describe Tcl commands.  To
  42. print any of the manual entries, cd to the "doc" directory and invoke
  43. your favorite variant of troff using the normal -man macros, for example
  44.  
  45.         ditroff -man wish.1
  46.  
  47. to print wish.1.  If Tk has been installed correctly and your "man"
  48. program supports it, you should be able to access the Tcl manual entries
  49. using the normal "man" mechanisms, such as
  50.  
  51.         man wish
  52.  
  53. If you are porting Tk 3.6 scripts to Tk 4.0 or later releases, you may
  54. find the Postscript file doc/tk4.0.ps useful.  It is a porting guide
  55. that summarizes the new features and discusses how to deal with the
  56. changes in Tk 4.0 that are not backwards compatible.
  57.  
  58. There is also an official home for Tcl and Tk on the Web:
  59.     http://www.smli.com/research/tcl
  60. These Web pages include release updates, reports on bug fixes and porting
  61. issues, HTML versions of the manual pages, and pointers to many other
  62. Tcl/Tk Web pages at other sites.  Check them out!
  63.  
  64. 3. Compiling and installing Tk
  65. ------------------------------
  66.  
  67. This release contains everything you should need to compile and run
  68. Tk under UNIX, Macintoshes, and PCs (either Windows NT, Windows 95,
  69. or Win 3.1 with Win32s).
  70.  
  71. Before trying to compile Tk you should do the following things:
  72.  
  73.     (a) Check for a binary release.  Pre-compiled binary releases are
  74.         available now for PCs and Macintoshes, and several flavors of
  75.         UNIX.  Binary releases are much easier to install than source
  76.         releases.  To find out whether a binary release is available for
  77.         your platform, check the home page for the Sun Tcl/Tk project
  78.         (http://www.sunlabs.com/research/tcl) and also check in the FTP
  79.         directory from which you retrieved the base distribution.
  80.  
  81.     (b) Make sure you have the most recent patch release.  Look in the
  82.     FTP directory from which you retrieved this distribution to see
  83.     if it has been updated with patches.  Patch releases fix bugs
  84.     without changing any features, so you should normally use the
  85.     latest patch release for the version of Tk that you want. 
  86.     Patch releases are available in two forms.  A file like
  87.     tk8.0p1.tar.Z is a complete release for patch level 1 of Tk
  88.     version 8.0.  If there is a file with a higher patch level than
  89.     this release, just fetch the file with the highest patch level
  90.     and use it.
  91.  
  92.     Patches are also available in the form of patch files that just
  93.     contain the changes from one patch level to another.  These
  94.     files have names like tk8.0p1.patch, tk8.0p2.patch, etc.  They
  95.     may also have .gz or .Z extensions to indicate compression.  To
  96.     use one of these files, you apply it to an existing release with
  97.     the "patch" program.  Patches must be applied in order:
  98.     tk8.0p1.patch must be applied to an unpatched Tk 8.0 release
  99.     to produce a Tk 8.0p1 release;  tk8.0p2.patch can then be
  100.     applied to Tk 8.0p1 to produce Tk 8.0p2, and so on. To apply an
  101.     uncompressed patch file such as tk8.0p1.patch, invoke a shell
  102.     command like the following from the directory containing this
  103.     file:
  104.         patch -p < tk8.0p1.patch
  105.     If the patch file has a .gz extension, it was compressed with
  106.     gzip.  To apply it, invoke a command like the following:
  107.         gunzip -c tk8.0p1.patch.gz | patch -p
  108.     If the patch file has a .Z extension, it was compressed with
  109.     compress.  To apply it, invoke a command like the following:
  110.         zcat tk8.0p1.patch.Z | patch -p
  111.     If you're applying a patch to a release that has already been
  112.     compiled, then before applying the patch you should cd to the
  113.     "unix" subdirectory and type "make distclean" to restore the
  114.     directory to a pristine state.
  115.  
  116. Once you've done this, change to the "unix" subdirectory if you're
  117. compiling under UNIX, "win" if you're compiling under Windows, or
  118. "mac" if you're compiling on a Macintosh.  Then follow the instructions
  119. in the README file in that directory for compiling Tk, installing it,
  120. and running the test suite.
  121.  
  122. 4. Getting started
  123. ------------------
  124.  
  125. The best way to get started with Tk is by reading one of the introductory
  126. books.
  127.  
  128. The subdirectory library/demos contains a number of pre-canned scripts
  129. that demonstrate various features of Tk.  See the README file in the
  130. directory for a description of what's available.  The file
  131. library/demos/widget is a script that you can use to invoke many individual
  132. demonstrations of Tk's facilities, see the code that produced the demos,
  133. and modify the code to try out alternatives.
  134.  
  135. 5. Summary of changes in Tk 8.0
  136. -------------------------------
  137.  
  138. Here is a list of the most important new features in Tk 8.0.  The
  139. release also includes several smaller feature changes and bug fixes. 
  140. See the "changes" file for a complete list of all changes.
  141.  
  142.     1. Native look and feel.  The widgets have been rewritten to provide
  143.     (nearly?) native look and feel on the Macintosh and PC.  Many
  144.     widgets, including scrollbars, menus, and the button family, are
  145.     implemented with native platform widgets.  Others, such as entries
  146.     and texts, have been modified to emulate native look and feel. 
  147.     These changes are backwards compatible except that (a) some
  148.     configuration options are now ignored on some platforms and (b) you
  149.     must use the new menu mechanism described below to native look and
  150.     feel for menus.
  151.  
  152.     2. There is a new interface for creating menus, where a menubar is
  153.     implemented as a menu widget instead of a frame containing menubuttons.
  154.     The -menu option for a toplevel is used to specify the name of the
  155.     menubar; the menu will be displayed *outside* the toplevel using
  156.     different mechanisms on each platform (e.g. on the Macintosh the menu
  157.     will appear at the top of the screen).  See the menu demos in the
  158.     widget demo for examples.  The old style of menu still works, but
  159.     does not provide native look and feel.  Menus have several new
  160.     features:
  161.         - New "-columnbreak" and "-hideMargin" options make it possible
  162.       to create multi-column menus.
  163.     - It is now possible to manipulate the Apple and Help menus on
  164.       the Macintosh, and the system menu on Windows.  It is also
  165.       possible to have a right justified Help menu on Unix.
  166.     - Menus now issue the virtual event <<MenuSelect>> whenever the
  167.       current item changes.  Applications can use this to generate
  168.       help messages.
  169.         - There is a new "-direction" option for menubuttons, which
  170.       controls where the menu pops up revenues to the button.
  171.  
  172.     3. The font mechanism in Tk has been completely reworked:
  173.     - Font names need not be nasty X LFDs: more intuitive names
  174.       like {Times 12 Bold} can also be used.  See the manual entry
  175.       font.n for details.
  176.     - Font requests always succeed now.  If the requested font is
  177.       not available, Tk finds the closest available font and uses
  178.       that one.
  179.     - Tk now supports named fonts whose precise attributes can be
  180.       changed dynamically.  If a named font is changed, any widget
  181.       using that font updates itself to reflect the change.
  182.     - There is a new command "font" for creating named fonts and
  183.       querying various information about fonts.
  184.     - There are now officially supported C APIs for measuring and
  185.       displaying text.  If you use these APIs now, your code will
  186.       automatically handle international text when internationalization
  187.       is added to Tk in a future release.  See the manual entries
  188.       MeasureChar.3, TextLayout.3, and FontId.3.
  189.     - The old C procedures Tk_GetFontStruct, Tk_NameOfFontStruct,
  190.       and Tk_FreeFontStruct have been replaced with more portable
  191.       procedures Tk_GetFont, Tk_NameOfFont, and Tk_FreeFont.
  192.  
  193.     4. Application embedding.  It is now possible to embedded one Tcl/Tk
  194.     application inside another, using the -container option on frame
  195.     widgets and the -use option for toplevel widgets or on the command
  196.     line for wish.  Embedding should be fully functional under Unix,
  197.     but the implementation is incomplete on the Macintosh and PC.
  198.  
  199.     5. Tk now works correctly with Safe-Tcl: it can be loaded into
  200.     safe interpreters using safe::loadTk.
  201.  
  202.     6. Text widgets now allow images to be embedded directly in the
  203.     text without using embedded windows.  This is more efficient and
  204.     provides smoother scrolling.
  205.  
  206.     7. Buttons have a new -default option for drawing default rings in
  207.     a platform-specific manner.
  208.  
  209.     8. There is a new "gray75" bitmap, and the "gray25" bitmap is now
  210.     really 25% on (due to an ancient mistake, it had been only 12% on).
  211.     The Macintosh now supports native bitmaps, including new builtin
  212.     bitmaps "stop", "caution", and "note", plus the ability to use
  213.     bitmaps in the application's resource fork.
  214.  
  215.     9. The "destroy" command now ignores windows that don't exist
  216.     instead of generating an error.
  217.  
  218. Tk 8.0 introduces the following incompatibilities that may affect Tcl/Tk
  219. scripts that worked under Tk 4.2 and earlier releases:
  220.  
  221.     1. Font specifications such as "Times 12" now interpret the size
  222.     as points, whereas it used to be pixels (this was actually a bug,
  223.     since the behavior was documented as points).  To get pixels now,
  224.     use a negative size such as "Times -12".
  225.  
  226.     2. The -transient option for menus is no longer supported.  You can
  227.     achieve the same effect with the -type field.
  228.  
  229.     3. In the canvas "coords" command, polygons now return only the
  230.     points that were explicitly specified when the polygon was created
  231.     (they used to return an extra point if the polygon wasn't originally
  232.     closed).  Internally, polygons are still closed automatically for
  233.     purposes of display and hit detection; the extra point just isn't
  234.     returned by the "coords" command.
  235.  
  236.     4. The photo image mechanism now uses Tcl_Channels instead of FILEs,
  237.     in order to make it portable.  FILEs are no longer used anywhere
  238.     in Tk.  The procedure Tk_FindPhoto now requires an extra "interp"
  239.     argument in order to fix a bug where images in different interpreters
  240.     with the same name could get confused.
  241.  
  242.     5. The procedures Tk_GetFontStruct, Tk_NameOfFontStruct,
  243.     and Tk_FreeFontStruct have been removed.
  244.  
  245. Note: the new compiler in Tcl 8.0 may also affect Tcl/Tk scripts; check
  246. the Tcl documentation for information on incompatibilities introduced by
  247. Tcl 8.0.
  248.  
  249. 6. Tcl/Tk newsgroup
  250. -------------------
  251.  
  252. There is a network news group "comp.lang.tcl" intended for the exchange
  253. of information about Tcl, Tk, and related applications.  Feel free to use
  254. this newsgroup both for general information questions and for bug reports.
  255. We read the newsgroup and will attempt to fix bugs and problems reported
  256. to it.
  257.  
  258. When using comp.lang.tcl, please be sure that your e-mail return address
  259. is correctly set in your postings.  This allows people to respond directly
  260. to you, rather than the entire newsgroup, for answers that are not of
  261. general interest.  A bad e-mail return address may prevent you from
  262. getting answers to your questions.  You may have to reconfigure your news
  263. reading software to ensure that it is supplying valid e-mail addresses.
  264.  
  265. 7. Mailing lists
  266. ----------------
  267.  
  268. A couple of  Mailing List have been set up to discuss Macintosh or
  269. Windows related Tcl issues.  In order to use these Mailing Lists you
  270. must have access to the internet.  If you have access to the WWW the
  271. home pages for these mailing lists are located at the following URLs:
  272.  
  273.     http://www.sunlabs.com/research/tcl/lists/mactcl-list.html
  274.  
  275.         -and-
  276.  
  277.     http://www.sunlabs.com/research/tcl/lists/wintcl-list.html
  278.  
  279. The home pages contain information about the lists and an HTML archive
  280. of all the past messages on the list.  To subscribe send a message to:
  281.     
  282.     listserv@sunlabs.sun.com
  283.     
  284. In the body of the message (the subject will be ignored) put:
  285.     
  286.     subscribe mactcl Joe Blow
  287.     
  288. Replacing Joe Blow with your real name, of course.  (Use wintcl
  289. instead of mactcl if your interested in the Windows list.)  If you
  290. would just like to receive more information about the list without
  291. subscribing but the line:
  292.  
  293.     information mactcl
  294.     
  295. in the body instead (or wintcl).
  296.  
  297. 8. Tcl/Tk contributed archive
  298. --------------------------
  299.  
  300. Many people have created exciting packages and applications based on Tcl
  301. and/or Tk and made them freely available to the Tcl community.  An archive
  302. of these contributions is kept on the machine ftp.neosoft.com.  You
  303. can access the archive using anonymous FTP;  the Tcl contributed archive is
  304. in the directory "/pub/tcl".  The archive also contains several FAQ
  305. ("frequently asked questions") documents that provide solutions to problems
  306. that are commonly encountered by TCL newcomers.
  307.  
  308. 9. Support and bug fixes
  309. ------------------------
  310.  
  311. We're very interested in receiving bug reports and suggestions for
  312. improvements.  We prefer that you send this information to the
  313. comp.lang.tcl newsgroup rather than to any of us at Sun.  We'll see
  314. anything on comp.lang.tcl, and in addition someone else who reads 
  315. comp.lang.tcl may be able to offer a solution.  The normal turn-around
  316. time for bugs is 3-6 weeks.  Enhancements may take longer and may not
  317. happen at all unless there is widespread support for them (we're
  318. trying to slow the rate at which Tk turns into a kitchen sink).  It's
  319. very difficult to make incompatible changes to Tcl at this point, due
  320. to the size of the installed base.
  321.  
  322. When reporting bugs, please provide a short wish script that we can
  323. use to reproduce the bug.  Make sure that the script runs with a
  324. bare-bones wish and doesn't depend on any extensions or other
  325. programs, particularly those that exist only at your site.  Also,
  326. please include three additional pieces of information with the
  327. script:
  328.     (a) how do we use the script to make the problem happen (e.g.
  329.     what things do we click on, in what order)?
  330.     (b) what happens when you do these things (presumably this is
  331.         undesirable)?
  332.     (c) what did you expect to happen instead?
  333.  
  334. The Tcl/Tk community is too large for us to provide much individual
  335. support for users.  If you need help we suggest that you post questions
  336. to comp.lang.tcl.  We read the newsgroup and will attempt to answer
  337. esoteric questions for which no-one else is likely to know the answer.
  338. In addition, Tcl/Tk support and training are available commercially from
  339. NeoSoft (info@neosoft.com), Computerized Processes Unlimited
  340. (gwl@cpu.com), and Data Kinetics (education@dkl.com).
  341.  
  342. 10. Release organization
  343. ------------------------
  344.  
  345. Each Tk release is identified by two numbers separated by a dot, e.g.
  346. 3.2 or 3.3.  If a new release contains changes that are likely to break
  347. existing C code or Tcl scripts then the major release number increments
  348. and the minor number resets to zero: 3.0, 4.0, etc.  If a new release
  349. contains only bug fixes and compatible changes, then the minor number
  350. increments without changing the major number, e.g. 3.1, 3.2, etc.  If
  351. you have C code or Tcl scripts that work with release X.Y, then they
  352. should also work with any release X.Z as long as Z > Y.
  353.  
  354. Alpha and beta releases have an additional suffix of the form a2 or b1.
  355. For example, Tk 3.3b1 is the first beta release of Tk version 3.3,
  356. Tk 3.3b2 is the second beta release, and so on.  A beta release is an
  357. initial version of a new release, used to fix bugs and bad features
  358. before declaring the release stable.  An alpha release is like a beta
  359. release, except it's likely to need even more work before it's "ready
  360. for prime time".  New releases are normally preceded by one or more
  361. alpha and beta releases.  We hope that lots of people will try out
  362. the alpha and beta releases and report problems.  We'll make new alpha/
  363. beta releases to fix the problems, until eventually there is a beta
  364. release that appears to be stable.  Once this occurs we'll make the
  365. final release.
  366.  
  367. We can't promise to maintain compatibility among alpha and beta releases.
  368. For example, release 4.1b2 may not be backward compatible with 4.1b1, even
  369. though the final 4.1 release will be backward compatible with 4.0.  This
  370. allows us to change new features as we find problems during beta testing.
  371. We'll try to minimize incompatibilities between beta releases, but if a
  372. major problem turns up then we'll fix it even if it introduces an
  373. incompatibility.  Once the official release is made then there won't
  374. be any more incompatibilities until the next release with a new major
  375. version number.
  376.  
  377. Patch releases have a suffix such as p1 or p2.  These releases contain
  378. bug fixes only.  A patch release (e.g Tk 4.1p2) should be completely
  379. compatible with the base release from which it is derived (e.g. Tk
  380. 4.1), and you should normally use the highest available patch release.
  381.